package cn.zhf.shop.service;

import cn.zhf.shop.entity.Campus;
import cn.zhf.shop.entity.Message;
import cn.zhf.shop.entity.search.CampusSearch;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface CampusService {
    /**
     * 增加新校区
     * @param c
     * @return
     */
    Message<?> addCampus(Campus c);

    /**
    * @Author: Wls
    * @Date: 20:31 2020/6/9
    * @Description: 根据校区编号获取校区信息
    */
    Message<Campus> getCampusById(Integer id);


    /**
    * @Author: Wls
    * @Date: 20:32 2020/6/9
    * @Description: 获取所有校区
    */
    Message<List<Campus>> getAllCampus();

    /**
    * @Author: Wls
    * @Date: 20:32 2020/6/9
    * @Description: 删除校区信息
    */
    Message<?> deleteCampus(Integer id);

    /**
    * @Author: Wls
    * @Date: 20:32 2020/6/9
    * @Description: 根据机构Id获取其名下的信息
    */
    Message<List<Campus>> getCampusByOrgId(Integer orgId);

    /**
    * @Author: Wls
    * @Date: 20:33 2020/6/9
    * @Description: 根据城市获取校区信息
    */
    Message<List<Campus>> getCampusByCity(String city);

    /**
    * @Author: Wls
    * @Date: 20:33 2020/6/9
    * @Description: 根据名称搜索校区
    */
    Message<List<Campus>> searchCampusByName(String name);

    /**
    * @Author: Wls
    * @Date: 20:34 2020/6/9
    * @Description: 更新校区状态
    */
    Message<?> updateCampusState(Integer id,Integer state);

    /**
    * @Author: Wls
    * @Date: 20:34 2020/6/9
    * @Description: 更新校区信息
    */
    Message<?> updateCampusById(Integer id,Campus c);
    Message<List<Campus>> searchCampusByHead(Integer head);

    Campus getCampusById2(Integer id);

    String selectCampusNameByCampusId(Integer campusId);

    Message<List<Campus>> selectByHead(@Param("head")Integer head);

    Campus selectByPrimaryKey2(Integer campusId);

    Message<List<Campus>> search2(Integer userid,String str);

    Message<List<Campus>> search1(Integer userid,String campusName,String provice);

    Message mohuConditionSearch(CampusSearch c);

    Message getAllcampusByreferenceId(int referenceId);
}
